#include <xp/bas/string.h>
#include <xp/bas/stdio.h>
#include <xp/bas/locale.h>

int xp_main (int argc, xp_char_t* argv[])
{
	xp_setlocale ();

	if (argc != 2) {
		xp_printf (XP_TEXT("usage: %s string\n"), argv[0]);
		return -1;
	}

	xp_printf (
		XP_TEXT("xp_strxpac (%s, %ld) => "),
		argv[1], xp_strlen(argv[1]));
	argv[1][xp_strxpac (argv[1], xp_strlen(argv[1]))] = XP_CHAR('\0');

	xp_printf (XP_TEXT("[%s]\n"), argv[1]);
	return 0;
}

